//
// Created by Apple on 2021/5/30.
//

#ifndef SINGLETON_HPP
#define SINGLETON_HPP

_Pragma("once")

namespace TWT{
namespace Util{

template <typename T>
class Singleton {
public:
    static T& instance(){
        static T instance_;
        return instance_;
    }
private:

    T(const T&) = delete;
    T(T &&) = delete;
    T& operator=(const T&) = delete;
    T& operator=(T&&) = delete;
};
}
}



#endif //EXERCIS_CPP_SINGLETON_HPP
